package router

import (
	"admin/src/control/user"

	"github.com/gin-gonic/gin"
)

func InitUserRouter(api *gin.RouterGroup) {
	userApi := user.UserController{}
	userRouter := api.Group("/user")
	userRouter.POST("/login", userApi.Login)
	userRouter.POST("/register", userApi.Register)
	userRouter.GET("/info", userApi.GetUserInfo)
	userRouter.PUT("/update", userApi.UpdateUser)
	userRouter.DELETE("/delete", userApi.DeleteUser)
}
